<template>
  <div class="child-view">
    <p>儿子组件</p>
    <grand-child v-bind="$attrs" />
  </div>
</template>

<script>
import GrandChild from './GrandChild.vue'
export default {
  // 继承所有父组件的内容
  inheritAttrs: true,
  components: {
    GrandChild
  },
  created () {
    console.log(this.$attrs)
  },
  data () {
    return {}
  }
}
</script>

<style lang="less" scoped>
.child-view {
  margin: 20px;
  border: 2px solid red;
  padding: 20px;
}
</style>